Move a File to or from a USB Device

Use the following procedure to move a file from the internal Flash memory (Intflash) to an external USB device, or from a USB device to Intflash.

Caution

Caution

Always use the usb-stop command to safely unplug the USB drive from the USB slot.

Procedure

  1. Enter Privileged EXEC mode:

    enable

  2. Move a file to a safe location:
    1. To move a file from Intflash to a USB device:

      mv /intflash/<srcfile> /usb/<destfile>

    2. To move a file from a USB device to Intflash:

      mv /usb/<srcfile> /intflash/<destfile>

Example

Switch:1#enable
Switch:1#mv /intflash/test.cfg /usb/test.cfg
Switch:1#enable
Switch:1#mv /usb/test.cfg /intflash/test.cfg

Variable Definitions

The following table defines parameters for the mv command.

Variable

Value

<destfile>

Specifies the name of the configuration or log file when moved to the USB device. The destination file name must be lower case and have a file extension of .cfg or .log. For example, test.cfg or test.log.

The file name, including the directory structure, can include up to 255 characters.

<srcfile>

Specifies the name of the configuration or log file on the internal flash memory. For example, test.cfg or test.log.

The file name, including the directory structure, can include up to 255 characters.